<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <head> <style type="text/css">
            html, 
            body
{
    height: 100%;
    background:#fff url(solenuvola.jpg) no-repeat center center;
    background-size:cover;
    box-shadow:inset 0 -1px 5px rgba(0,0,0,0.6);
}
        </style>
        <script src="jquery-1.6.2.min.js"></script>
<script src="jquery-ui-1.8.15.custom.min.js"></script>
<link rel="stylesheet" href="jquery/jqueryCalendar.css"/>
   <script>
                jQuery(function() {
                                jQuery( "#{EventBean.event.dataEvento}" ).datepicker();
                });
                </script>
        <title>Event Modification
        </title>
    </head>
    <body>
        <div>
            <h:form class="eventcreation">
                <p:panel>
                    <b> <u> Modify your event, fill only fields you want to change </u> </b> 
                  <fieldset>
                       <br/>
                       <label for="text">Name of the event:</label>
                       <br/>
                       <p:inputText id="eventname" type="text" placeholder="Title of this event" value="#{EventBean.event.eventName}" />
                  </fieldset>
                  <fieldset>
                      <label for="date">Date (MM/DD/YYYY):</label>
                      <br/>
                      <p:calendar  id="dataevento" value="#{EventBean.event.dataEvento}"  placeholder="Event date" /> 
                  </fieldset>
                  <fieldset>
                      <label for="text">Place:</label>
                      <br/>
                      <p:inputText type="text" placeholder="Place where the event will take place" value="#{EventBean.event.place}" />
                  </fieldset>
                  <fieldset>
                      <label for="text">Description:</label>
                      <br/>
                      <p:inputTextarea placeholder="Brief description of the event" value="#{EventBean.event.description}" />
                      <br/>
                  </fieldset>
                  <fieldset>
                      <h:outputText value="Outdoor: " />
                      <p:selectBooleanCheckbox value="#{EventBean.event.outdoor}"/>
                  </fieldset>
                  <fieldset>
                      <h:outputText value="Private event? " />
                      <p:selectBooleanCheckbox value="#{EventBean.event.privacy}"/>
                  </fieldset>
                    <p:commandButton action="#{EventBean.modifyevent()}" value="MODIFY THIS EVENT" ajax="true" update="@all"/>
                </p:panel>
            </h:form>
            <br/><br/>
        </div>
    </body>
</html>
